package com.oamicnet.mapstruct.controller;

import com.oamicnet.mapstruct.controller.dto.UserDTO;
import com.oamicnet.mapstruct.service.UserService;

public class UserController {

    public void saveUser(UserDTO userDTO){
        //保存到数据库
        UserService userService = new UserService();
        userService.saveUser(userDTO);
    }

    public UserDTO getUserById(Long id){
        //保存到数据库
        UserService userService = new UserService();
        return userService.findUserById(id);
    }
}
